/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.modelo;

import java.util.Collection;
import javax.persistence.CollectionTable;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;

/**
 *
 * @author egberto
 */
@Entity
public class Funcionario {
    
    @Id
    @GeneratedValue
    private Long id;
    
    private String nome;
    
    @ElementCollection
    @CollectionTable(
            name="Telefones_dos_Funcionarios",
            joinColumns=@JoinColumn(name="func_id"))
    @Column(name="telefone")
    private Collection<String> telefones;
    
}
